package com.ble;

import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;

import com.inuker.bluetooth.library.BluetoothClient;
import com.tencent.bugly.crashreport.CrashReport;

public class App extends Application {


    protected static Context mContext;
    @SuppressLint("StaticFieldLeak")
    private static App instance;


    private static BluetoothClient bluetoothClient;

    public static App getInstance() {
        return instance;
    }

    public static Context getContext() {
        return mContext;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        mContext = this;
        instance = this;
        bluetoothClient = new BluetoothClient(this);

        CrashReport.initCrashReport(getApplicationContext(), "734b5b80de", false);

    }

    public static BluetoothClient getBle() {
        if (bluetoothClient == null) {
            bluetoothClient = new BluetoothClient(getContext());
        }
        return bluetoothClient;
    }


}
